/**
 * 
 * 客户管理
 * 
 * */
import React from 'react';
import Header from '@/component/layout/Header/Header';
import { Link } from "react-router-dom";
import { connect } from 'react-redux';

import './style.less';

const CustomerManage = (props) => {
  // console.log(props)
  const { user: { role } } = props;
  return <>
    <Header center={<span>客户管理</span>} />
    <div className="global-content CustomerManage-box">
      <Link className="CustomerManage-navitem" to={role=="1"?"/customerList":"/docList"}>
        <img className="img1" src={require('../../assests/img/kehuliebiao0-1.png')} alt="" />
        <span>{role == 1 ? "用户列表" : "客户列表"}</span>
      </Link>
      <Link className="CustomerManage-navitem" to={role=="1"?"/customerAnalysis":"/docListAnalysis"}>
        <img className="img2" src={require('../../assests/img/kehufenxi0-1.png')} alt="" />
        <span>客户分析</span>
      </Link>
      <Link className="CustomerManage-navitem" to="/questionnaire">
        <img className="img3" src={require('../../assests/img/wenjuandiaocha0-1.png')} alt="" />
        <span>问卷调查</span>
      </Link>
    </div>
  </>

}


const mapStateToProps = state => {
  return {
    user: state.user
  }
}


export default connect(mapStateToProps, null)(CustomerManage);